
local year=year in 1

	/* Jaeger (1997) categories */
	if 1979<=`year' & `year'<=1991 {
		gen byte educ=1 if 1<=gradeat & gradeat<=11
		replace educ=1 if gradeat==12 & gradecp==2 /* didn't complete 12th */
		replace educ=2 if gradeat==12 & gradecp==1 /* completed 12th */
		replace educ=3 if 13<=gradeat & gradeat<=15
		replace educ=3 if gradeat==16 & gradecp==2 /* didn't complete college */
		replace educ=4 if gradeat==16 & gradecp==1 /* completed college */
		replace educ=4 if gradeat==17 /* "completed 4 or 5 years college" */
		replace educ=5 if 18<=gradeat & gradeat~=.
	}
	if 1992<=`year' {
		gen byte educ=1 if 31<=grade92 & grade92<=38 // changed to put no diploma here
		replace educ=2 if 39<=grade92 & grade92<=39 /* includes "no diploma" */
		replace educ=3 if 40<=grade92 & grade92<=42
		replace educ=4 if grade92==43
		replace educ=5 if 44<=grade92 & grade92<=46
	}

	lab var educ "Education level"
	#delimit ;
	lab define educ
		1 "LTHS"
		2 "HS"
		3 "Some college"
		4 "College"
		5 "Advanced"
		;
	#delimit cr
	lab val educ educ
	notes educ: Follows Jaeger (1997) classifications
	notes educ: CPS: derived from a-hga, a-hgc, peeduca
